﻿/*----------------------------------------------------------------
//  <copyright file="OracleSequentialGuidGenerator.cs" company="MicroCloud@151504200868">
//      Copyright © 2020-2024 MicroCloud Corporation, All rights reserved.
//  </copyright>
//  <site>https://gitee.com/chenmm123/microclouds</site>
//  <last-editor>cmm</last-editor>
//  <last-date>2023-11-21 10:56</last-date>
//----------------------------------------------------------------*/

namespace MicroCloud.Entity.Oracle
{
    #region "Oracle数据库有序Guid生成器"
    /// <summary>
    /// Oracle数据库有序Guid生成器
    /// </summary>
    public class OracleSequentialGuidGenerator : ISequentialGuidGenerator
    {
        #region "属性"
        #region "获取 数据库类型"
        /// <summary>
        /// 获取 数据库类型
        /// </summary>
        public DatabaseType DatabaseType { get; } = DatabaseType.Oracle;
        #endregion

        #endregion

        #region "方法"
        #region "获取一个 <see cref="Guid"/> 类型的主键数据"
        /// <summary>
        /// 获取一个 <see cref="Guid"/> 类型的主键数据
        /// </summary>
        /// <returns></returns>
        public Guid Create()
        {
            return SequentialGuid.Create(SequentialGuidType.SequentialAsBinary);
        }
        #endregion

        #endregion

    }
    #endregion

}
